package com.springboot.shiro.service.impl;

import com.springboot.shiro.mapper.UserMapper;
import com.springboot.shiro.pojo.User;
import com.springboot.shiro.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Date: 2019/10/23 16:19
 * @author: ybzhu
 * @Description：
 */
@Service
public class UserServiceImpl implements UserService {


    @Autowired
    private UserMapper userMapper;

    /**
     * 创建用户
     * @param user
     * @return
     */
    @Override
    public int insert(User user) {
        return userMapper.insertSelective(user);
    }

    /**
     * 假删除用户
     * @param loginName
     * @return
     */
    @Override
    public Integer updateByUserName(String loginName) {
        return userMapper.updateByUserName(loginName);
    }
}
